import Vuex from 'vuex'

import createPersistedState from 'vuex-persistedstate';
import defaultState from './state/state'
import mutations from './mutations/mutations'

export default () => {
  return new Vuex.Store({
    plugins: [createPersistedState({
        storage: window.sessionStorage
    })],
    state: defaultState,
    mutations
  })
}
